TARGET = libFoo.a

CC = gcc
CCFLAGS = -c -g
INCLUDEPATH = -I../include
AR = ar
ARFLAG = rcs
LIBPATH = ../lib/

OBJ = foo.o

all : $(TARGET)

$(TARGET): $(OBJ)
	$(AR) $(ARFLAG) $(LIBPATH)$(TARGET) *.o

$(OBJ): foo.c
	$(CC) $(CCFLAGS) $(INCLUDEPATH) foo.c -o $(OBJ)

.phony: clean 
clean:
	rm $(OBJ)
	rm $(LIBPATH)$(TARGET)
